<?php

use home\assets\PageAsset;

/* @var $this yii\web\View */
/* @var $model \home\models\Timeline */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Biffar 事记', 'url' => ['timeline/index']];
$this->params['breadcrumbs'][] = $this->title;

PageAsset::register($this)->init([
    'css' => [
        'css/page.css',
    ],
]);
?>

<div class="page-body">
    <div class="container">
        <div class="timeline-detail">
            <h1><?= $model->name ?></h1>
            <h3><?= date('Y-m-d H:i:s', $model->created_at) ?></h3>
            <div>
                <?= $model->content ?>
            </div>
        </div>
    </div>
</div>

<?php if($model->case){ ?>
    <div class="relation-area">
        <div class="container">
            <div class="relation-title">
                <h1>Case</h1>
                <h3>相关案例</h3>
            </div>

            <div class="relation-box">
                <div class="relation-list">
                    <ul>
                        <li><a href="<?= $model->case->getViewUrl() ?>"><img src="<?= $model->case->getPreviewUrl(264, 170) ?>" /></a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
<?php } ?>